Repository navigation
Document removing or replacing a shipped case mask - #1020
Merged
Merged
Conversation
customize.rst showed how to add a capitalization_exceptions mask but not how to drop or replace one. A mask belongs to the word, not a reading, so remove(word, kind=...) leaves it in place; filtering the pair out of capitalization_exceptions drops it, and appending a pair replaces it, the later pair for a key winning. Doctests pin all three, using the Mac masks #1014 shipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/customize.rst's "Fixing the case of a particular word" section showed how to add a case mask but not how to drop or replace a shipped one. This came up after #1016 shipped the Mac surname masks. Docs only; no behavior changes.The new subsection, "Removing or replacing a shipped mask", says:
MacDonaldis masked,MachadoandMackenzieare not), andMckeeps its capital.remove()does not drop a mask. A mask belongs to the word, not to one of its readings, sodefault.remove("macdonald", kind="family")still repairsRONALD MACDONALDtoRonald MacDonald. Filtering the pair out ofcapitalization_exceptionsdrops it (Ronald Macdonald)._lexicon._normpairsdocuments, so appending("phd", "PHD")replaces the shippedPhDmask without removing it first.Each claim is a doctest. Both
sphinx-build -b doctestand-b htmlprint nothing.🤖 Generated with Claude Code